package com.bjpowernode;


import java.util.Scanner;

public class t1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int i = scanner.nextInt();
        System.out.println("第二个");
        int i1 = scanner.nextInt();
        int m = 0;
        int n=0;
        if(i>i1){
            m=i;
            n=i1;
        }

        for (int i2=m; i2 >0; i2*=2) {
            if(i2%m==0&i2%n==0){
                System.out.println(i2);
            }
        }

    }
}
